<%--
*
* 描述：附件管理表BASIC_DOCUMENTS_UPLOAD的list文件列表
* 
* @author tch 
*
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="g" uri="/fishergrid-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title><s:property value="operate"/>附件管理列表</title>
	<%@include file="/share/header.jsp"%>
	<s:head/>	
	<g:header theme="${sessionScope.skinCon.gridSkin}"/>	
  </head>
  <body>
	<script type="text/javascript">
		//新增
		function onDoAdd(name,g){
			var options={
				title:'【新增附件管理】',
				url:'<s:url action='new' namespace='/basic/documentsupload'/>',
				source : window,
				buttons:[top.MyWindow.Save,top.MyWindow.Cancel],
				multiplewidth:1,
				multipleheight:1,
				tipstitle:'',
				tipscontent:''
			};
			top.MyWindow.open(options);
		}
		//下载	
		function onDoOperateRenderer(tdDiv,pid){
			var options={
				title:'【下载附件】',
				url:'<s:url action="edit" namespace='/basic/documentsupload'/>?domain.id='+pid,
				source : window,
				buttons:[top.MyWindow.Save,top.MyWindow.Cancel],
				multiplewidth:1,
				multipleheight:1,
				tipstitle:'',
				tipscontent:''
			};
			var edithtml='<a href="javascript:void(0);" title="下载">下载</a>';
			$(tdDiv).html("");//去除原有的内容
			$(tdDiv).append($(edithtml).click(function(){//添加链接
											window.location.href='<s:url action="edit" namespace='/basic/documentsupload'/>?domain.id='+pid+'&saveFilePath=<%=request.getParameter("saveFilePath") %>';
										})
							);
		}	
		//查看		
		function onDoNameRenderer(tdDiv,pid){
			var options={
				title:'【查看附件管理】',
				url:'<s:url action="view" namespace='/basic/documentsupload'/>?readonly=true&domain.id='+pid,
				source : window,
				buttons:[top.MyWindow.Close],
				multiplewidth:1,
				multipleheight:1,
				tipstitle:'',
				tipscontent:''
			};			
			var viewhtml='<a href="javascript:void(0);" title="查看【'+$(tdDiv).html()+'】详细信息">'+$(tdDiv).html()+'</a>';
			$(tdDiv).html("");//去除原有的内容
			$(tdDiv).append($(viewhtml).click(function(){//添加链接
											top.MyWindow.open(options);
										})
							);				
		}		
		//删除
		function onDoDelete(name,grid){
			onDoAjax({url:'<s:url action='deletes' namespace='/basic/documentsupload'></s:url>'});
		}	
		//启用
		function onDoEnable(name,grid){
			onDoAjax({url:'<s:url action='changes' namespace='/basic/documentsupload'></s:url>?domain.state=1',tip:'启用'});
		}
		//停用
		function onDoUnEnable(name,grid){
			onDoAjax({url:'<s:url action='changes' namespace='/basic/documentsupload'></s:url>?domain.state=2',tip:'停用'});
		}
		//复制
		function onDoCopy(name,grid){
			onDoAjax({url:'<s:url action='copys' namespace='/basic/documentsupload'></s:url>',tip:'复制'});
		}										
	</script>  
  	<s:actionerror/>
  	<g:grid title="附件管理列表" name="/basic/documentsupload/documents_upload_all.fisher.xml">
  		<g:select/>
<%--  		<g:separator/>--%>
<%--  		<g:button name="新增" styleClass="fisherAdd" onclick="onDoAdd"/>--%>
<%--  		<g:separator/> --%>
<%--  		<g:button name="启用" styleClass="fisherCheck" onclick="onDoEnable"/>--%>
<%--  		<g:button name="停用" styleClass="fisherUncheck" onclick="onDoUnEnable"/>--%>
<%--  		<g:separator/>  --%>
<%--  		<g:button name="复制" styleClass="fisherCopy" onclick="onDoCopy"/>--%>
  		<g:separator/>   		  		 
  		<g:button name="删除" styleClass="fisherDelete" onclick="onDoDelete"/>
  		<g:separator/>   				
  		<g:query/>
  		<g:separator/>
  		<g:export  excludeColumns="operation"/>			
  	</g:grid>
  </body>
</html>
